/**
 * Created by Qingger Corp.
 * User: Administrator
 * Date: 2019-05-17
 * Time: 13:20
 */
import request from '@/utils/request'

//获取分销订单汇总
export function getSummary() {
  return request({
    url:'/shop/promoter/summary',
    method:'get',
  })
}

//获取分销订单列表
export function getOrderList(params) {
  return request({
    url:'/shop/promoter/orderList',
    method:'get',
    params:params
  })
}

//获取分销申请记录
export function getPromoterList(params) {
  return request({
    url:'/shop/promoter/applyList',
    method:'get',
    params:params
  })
}

//获取指定分销人员基本信息
export function getPromoterDetail(memberId) {
  return request({
    url:'/shop/promoter/promoterDetail',
    method:'get',
    params:{memberId:memberId}
  })
}

//获取提现记录
export function getCashOutList(params) {
  return request({
    url:'/shop/promoter/cashOutList',
    method:'get',
    params:params
  })
}


//分销设置
export function promoterSet(data) {
  return request({
    url:'/shop/promoter/configSet',
    method:'post',
    data:data
  })
}

//获取分销设置
export function getConfigInfo(params) {
  return request({
    url:'/shop/promoter/configInfo',
    method:'get',
    params:params
  })
}

//分销人员批量设置
export function batchDelete(data) {
  return request({
    url:'/shop/promoter/batchSet',
    method:'post',
    data:data
  })
}

//提现批量打款
export function batchCheck(data) {
  return request({
    url:'/shop/promoter/batchCheckCashOut',
    method:'post',
    data:data
  })
}

//分销海报设置
export function adSet(data) {
  return request({
    url:'/shop/promoter/adSet',
    method:'post',
    data:data
  })
}

//获取分销海报信息
export function adInfo(params) {
  return request({
    url:'/shop/promoter/adInfo',
    method:'get',
    params:params
  })
}


//下载提现excle
export function exportDistribution(params) {
  return request({
    url:'/shop/promoter/cashOutExport',
    method:'get',
    params:params
  })
}


//设置分享背景图
export function setAppBackgroundPic(data) {
  return request({
    url:'/shop/promoter/setAppBackgroundPic',
    method:'post',
    data:data
  })
}


//获取分享背景图
export function getAppShareBGPic() {
  return request({
    url:'/shop/promoter/getAppShareBGPic',
    method:'get',
  })
}


//导出分销订单列表
export function orderListExcel(params) {
  return request({
    url:'/shop/promoter/orderListExcel',
    method:'get',
    params:params
  })
}

//获取分销教程列表
export function getArticleList(params) {
  return request({
    url:'/shop/cms/articleList',
    method:'get',
    params:params
  })
}

//获取分销教程详情
export function getArticleDetail(params) {
  return request({
    url:'/shop/cms/articleDetail',
    method:'get',
    params:params
  })
}

//保存分销教程详情
export function saveArticleDetail(data) {
  return request({
    url:'/shop/cms/articleEdit',
    method:'post',
    data:data
  })
}

//删除分销教程
export function delArticle(data) {
  return request({
    url:'/shop/cms/articleDel',
    method:'post',
    data:data
  })
}


//获取素材库列表
export function getMediaList(params) {
  return request({
    url:'/shop/cms/mediaList',
    method:'get',
    params:params
  })
}

//获取素材库详情
export function getMediaDetail(params) {
  return request({
    url:'/shop/cms/mediaDetail',
    method:'get',
    params:params
  })
}

//保存素材库详情
export function saveMediaDetail(data) {
  return request({
    url:'/shop/cms/mediaEdit',
    method:'post',
    data:data
  })
}


//删除素材库
export function delMediaDetail(data) {
  return request({
    url:'/shop/cms/mediaDel',
    method:'post',
    data:data
  })
}

//素材库上下架
export function mediaUp(data) {
  return request({
    url:'/shop/cms/mediaUp',
    method:'post',
    data:data
  })
}

//教程上下架
export function articleUp(data) {
  return request({
    url:'/shop/cms/articleUp',
    method:'post',
    data:data
  })
}
